package com.homeinns.esserver.utils;

import com.homeinns.esserver.vo.ResultVO;

/**
 * @ClassName ResultVOUtil
 * @Description TODO
 * @Author 樊志强
 * @Date 2018/9/30 9:24
 **/
public class ResultVOUtil {
    public static ResultVO success(Object object) {
        ResultVO resultVO = new ResultVO();
        resultVO.setData(object);
        resultVO.setCode(0);
        resultVO.setMessage("请求成功");

        return resultVO;
    }

    public static ResultVO error(Integer code, String msg){
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(code);
        resultVO.setMessage(msg);
        return resultVO;
    }
}
